﻿#pragma once
#include<stdio.h>
#include<assert.h>
#include<stdlib.h>
typedef int BTDatatype;
typedef struct Binary {
	struct Binary* left;
	struct Binary* right;
	int val;
}Binary;
#include"queue.h"
Binary* StrBinarTree(int x);
//前序遍历
int PrevOrder(Binary* qp);
//中序遍历
int MiddleOrder(Binary* qp);
//后序遍历
int AfterOrder(Binary* qp);
//节点个数
int TreeSize(Binary* qp);
//叶子节点个数
int TreeLeafSize(Binary* qp);
//第K层的节点个数
int TreeKLevel(Binary* qp, int k);
//销毁
void TreeDestroy(Binary* qp);
//寻找val为x的节点
Binary* FindTree(Binary* qp,int x);
//层序遍历
void TreeLevelOrder(Binary* qp);
//辨别是不是完全二叉树
int BinaryTreeComplete(Binary* root);